//
//  UILable+Extension.swift
//  SinaWeiBo
//
//  Created by King.Kong. on 16/5/26.
//  Copyright © 2016年 King.Kong. All rights reserved.
//

import UIKit

extension UILabel {    
    
    convenience init(title: String, textColor: UIColor,font: CGFloat,alignment:NSTextAlignment = .Center) {
        
        self.init()
        self.text = title
        self.textColor = textColor
        self.font = UIFont.systemFontOfSize(font)
        self.textAlignment = alignment
        self.numberOfLines = 0
        
        // 设置最大布局宽度
        if alignment == .Left {
            
            preferredMaxLayoutWidth = ScreenWidth - 2 * StatusCellMargin
        }

        sizeToFit()
//        l.alpha = 0
        
    }
    
}
